﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using HAUtil.DosRunUtil;
using HAUtilWpf;

using HAUtilWpf.windows;


namespace HA.ModFlow.Application
{

    /// <summary>
    /// 提供所有与运行相关的功能封装,这个类暂时没有启用
    /// </summary>
    public  class RunService
    {
        protected RunService()
        {
 
        }

        static RunService _defaultService;

        public static RunService DefaultService
        {
            get {

                if (_defaultService ==null )
                {

                    _defaultService = new RunService();
                }

                return RunService._defaultService;
            
            }
          
        }


        /// <summary>
        /// 计算modflow主程序
        /// </summary>
        public void RunModFlow()
        {

            if (ProjectService .DefaultService .BNullProj)
            {
                return;
            }




            winRunSystem winRun = new winRunSystem();

            //foreach (Solution item in ProjectSerivce.DefaultService.Project .Solutions)
            //{
            //    ///运行对应的选项
            //    SolutionRunObject obj = new SolutionRunObject(item);

            //    winRun.RunSystem.AddRunInstance(obj);


            //}




            winRun.ShowDialog();

            ///当程序被计算之后，需要重置某些关键信息，并导入到后处理中
            if (winRun.IsHaveRun == true)
            {
                //执行后处理内部的操作

                //CProj.DefaultProj.MainData.PostData.OnPrepareNewData();

            }
 
        }


    }
}
